package com.bawei.module_mall.http.state

import com.bawei.module_mall.model.AddAddressModel
import com.bawei.module_mall.model.AddShopModel
import com.bawei.module_mall.model.AddressModel
import com.bawei.module_mall.model.CityModel
import com.bawei.module_mall.model.CollectModel
import com.bawei.module_mall.model.CommentModel
import com.bawei.module_mall.model.DeleteModel
import com.bawei.module_mall.model.GetShopModel
import com.bawei.module_mall.model.HomeModel
import com.bawei.module_mall.model.IDModel
import com.bawei.module_mall.model.ProvincesModel
import com.bawei.module_mall.model.SearchGoodsModelItem
import com.bawei.module_mall.model.ShopDetailModel
import com.bawei.module_mall.model.ShopNumberModel
import com.bawei.module_mall.model.UpdateModel

sealed class ShopState {
    object Init : ShopState()
    object Loading : ShopState()
    data class ShopDetailSuccess(val data: ShopDetailModel?) : ShopState()
    data class CitySuccess(val data: CityModel?) : ShopState()
    data class HomeSuccess(val data: HomeModel?) : ShopState()
    data class GetShopSuccess(val data: GetShopModel?) : ShopState()
    data class ProvincesSuccess(val data: ProvincesModel?) : ShopState()
    data class GetAddressSuccess(val data: AddressModel?) : ShopState()
    data class AddAddressSuccess(val data: AddAddressModel?) : ShopState()
    data class UpdateAddressSuccess(val data: UpdateModel?) : ShopState()
    data class DeleteSuccess(val data: DeleteModel?) : ShopState()
    data class GetCollectSuccess(val data: CollectModel?) : ShopState()
    data class DeleteAddressSuccess(val data: Boolean?) : ShopState()
    data class Error(val error: String) : ShopState()

    // 新增：标记是否有地址（控制"添加按钮"显示）
    object NoAddress : ShopState()


    /**
     * 自己的橱窗
     */
    data class ViewShowedGoodsSuccess(val goodsList: List<SearchGoodsModelItem>):ShopState()
    data class SearchGoods(val goodsList: List<SearchGoodsModelItem>):ShopState()
    data class CheckGoods(val data:Boolean):ShopState()
    data class ToggleGoods(val data:Boolean):ShopState()
    data class QueryGoods(val goods: List<SearchGoodsModelItem>) : ShopState()






    // 收藏相关
    data class ToggleCollectSuccess(val goodsId: Int, val isCollected: Boolean) : ShopState()
    data class CheckCollectResult(val goodsId: Int, val isCollected: Boolean) : ShopState()
    data class GetShopNumberSuccess(val data:Int) : ShopState()
    data class UpdateShopNumberSuccess(val data: Boolean) : ShopState()
    data class GetCommentSuccess(val data: CommentModel?) : ShopState()
    data class GetGoodsIdsSuccess(val data: IDModel) : ShopState()



}